
//创建并初始话
let b = document.createElement('div');
document.body.appendChild(b);
//b的样式
b.style.position = 'absolute';
b.style.top = -80 +'px';
b.style.left = 50 + '%';
b.style.transform = 'translateX('+-50+'%)';
b.style.width = 200 +'px';
b.style.padding = 10 +'px'+' '+5 +'px';
b.style.border = '1px solid rgba(128, 128, 128, 0.74)';
b.style.boxShadow = '5px 5px 15px 1px rgba(23, 64, 197, 0.671)';
b.style.borderRadius = '5px';
b.style.backgroundColor = 'rgba(12, 82, 212, 0.377)';
b.style.fontWeight = '550';
b.style.textAlign = 'center';
b.style.color = 'rgb(190, 8, 69)';
b.style.transition = 'all ease-in-out 1s';
/**
 * @param [string]
*/
export default function myAlert(msg){
  let timer;
  //移动
  b.style.top = 40 +'px';
  b.innerHTML = msg
  console.log(b)
  timer = setTimeout(()=>{
    console.log(1);
    b.style.top = -50 +'px';
    clearTimeout(timer)
  },3000)
}